package com.tanhua.model;

import com.tanhua.model.mongo.Video;
import com.tanhua.model.vo.VideoVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Voice {
    private Integer id;
    private String avatar;//头像
    private String nickname;
    private String gender;//性别 man woman
    private Integer age;
    private String soundUrl;//语音地址
    private Integer remainingTimes  ;//剩余次数

    public static Voice init(UserInfo userInfo) {
        //缺少语音地址和剩余次数
        Voice voice = new Voice();
        BeanUtils.copyProperties(userInfo,voice);
        return voice;
    }
}
